<template>
  <div class="body">
    <!-- 搜索 -->
    <div class="ser_div">
      <el-row>
        <el-col>
          <el-row style="display: flex; align-items: center">
            <el-col :span="8" style="text-align: center"> 订单号 </el-col>
            <el-col :span="16">
              <el-input v-model="ser.order_number" type="number"></el-input>
            </el-col>
          </el-row>
        </el-col>
        <el-col>
          <el-row style="display: flex; align-items: center">
            <el-col :span="8" style="text-align: center"> 流水号 </el-col>
            <el-col :span="16">
              <el-input v-model="ser.serial_number"></el-input>
            </el-col>
          </el-row>
        </el-col>
        <el-col>
          <el-row style="display: flex; align-items: center">
            <el-col :span="8" style="text-align: center"> 客户 </el-col>
            <el-col :span="16">
              <el-select
                v-model="ser.customer_id"
                filterable
                placeholder="请选择客户"
                style="width: 100%"
              >
                <el-option
                  v-for="(item, index) in CustomerList"
                  :key="index"
                  :label="item.customer_name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-col>
          </el-row>
        </el-col>
        <el-col>
          <el-row style="display: flex; align-items: center">
            <el-col :span="8" style="text-align: center"> 产品 </el-col>
            <el-col :span="16">
              <el-select
                v-model="ser.product_id"
                filterable
                @change="product_id_change"
                placeholder="请选择产品"
                style="width: 100%"
              >
                <el-option
                  v-for="(item, index) in productList"
                  :key="index"
                  :label="item.product_name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-col>
          </el-row>
        </el-col>
        <el-col>
          <el-row style="display: flex; align-items: center">
            <el-col :span="8" style="text-align: center"> 型号 </el-col>
            <el-col :span="16">
              <el-select
                filterable
                v-model="ser.model_number_id"
                placeholder="请选择型号"
                style="width: 100%"
              >
                <el-option
                  v-for="(item, index) in ModelNumberList"
                  :key="index"
                  :label="item.model_number"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-col>
          </el-row>
        </el-col>
        <el-col>
          <el-row style="display: flex; align-items: center">
            <el-col :span="8" style="text-align: center"> 订单日期范围 </el-col>
            <el-col :span="16">
              <el-date-picker
                v-model="order_data"
                @change="order_data_change"
                value-format="yyyy-MM-dd"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              >
              </el-date-picker>
            </el-col>
          </el-row>
        </el-col>
        <el-col>
          <el-button @click="search(0)" class="add_btn" icon="el-icon-search"
            >查询</el-button
          >
          <el-button @click="searchreset" icon="el-icon-refresh" class="add_btn"
            >重置</el-button
          >
          <!-- <el-button @click="search(2)" icon="el-icon-plus" class="add_btn"
            >导出</el-button
          > -->
        </el-col>
      </el-row>
    </div>

    <el-table
      :data="ChildList"
      style="width: 100%"
      header-cell-class-name="header_style"
      border
    >
      <el-table-column prop="id" label="ID"> </el-table-column>
      <el-table-column prop="order_number" label="订单号" width="80">
      </el-table-column>
      <el-table-column prop="serial_number" label="流水号" width="80">
      </el-table-column>
      <el-table-column prop="serial_number" label="客户名称" width="100">
        <template slot-scope="scope">
          {{ scope.row.customer.customer_name }}
        </template>
      </el-table-column>

      <!-- <el-table-column prop="order_date" label="业务员" width="80">
        <template slot-scope="scope">
          {{ scope.row.account_executive.company_name }}
        </template>
      </el-table-column> -->

      <el-table-column prop="order_date" label="产品名称" width="80">
        <template slot-scope="scope">
          {{ scope.row.product.product_name }}
        </template>
      </el-table-column>
      <el-table-column prop="order_date" label="型号" width="80">
        <template slot-scope="scope">
          {{ scope.row.model_number.model_number }}
        </template>
      </el-table-column>
      <!-- <el-table-column  label="型号图片" width="80">
        <template slot-scope="scope">
          <img :src="uploadImgUrl+scope.row.model_number.file.file_url" @click="push_img(scope.row)"  style="cursor: pointer;display:block;width:60px;display: block;margin: 0 auto;" v-if="scope.row.model_number.file!=null"/>
          <img src="../../../src/assets/zwtp.jpg" style="width:60px;display: block;margin: 0 auto;"  v-else/> 
        </template>
      </el-table-column> -->
      <el-table-column label="规格" width="80">
        <template slot-scope="scope">
          {{
            scope.row.specification ? scope.row.specification.specification : ""
          }}
        </template>
      </el-table-column>
      <el-table-column prop="direction" label="方向" width="80">
      </el-table-column>

      <el-table-column label="颜色" width="80">
        <template slot-scope="scope">
          {{ scope.row.color.color }}
        </template>
      </el-table-column>
      <el-table-column prop="remark" label="备注" width="160">
      </el-table-column>
      <el-table-column label="紧急程度" width="80">
        <template slot-scope="scope">
          <span v-if="scope.row.emergency_procedure == 1" style="color: #333"
            >普通</span
          >
          <span
            v-if="scope.row.emergency_procedure == 2"
            style="color: #1890ff; font-weight: bold"
            >紧急</span
          >
          <span
            v-if="scope.row.emergency_procedure == 3"
            style="color: #ff0000; font-weight: bold"
            >十万火急</span
          >
        </template>
      </el-table-column>
      <el-table-column
        prop="order_date"
        label="下单日期"
        :formatter="formatterTime"
        width="100"
      >
      </el-table-column>
      <el-table-column
        prop="delivery_date"
        label="交货日期"
        :formatter="formatterTime"
        width="100"
      >
      </el-table-column>
      <!-- <el-table-column label="审核状态" width="80">
        <template slot-scope="scope">
          {{ scope.row.status == 1 ? "已通过" : "未审核" }}
        </template>
      </el-table-column> -->
      <el-table-column label="操作" width="400" fixed="right">
        <template slot-scope="scope">
          <el-row style="display: flex; align-items: center">
            <el-col :span="20">
              <div class="uls">
                <div
                  v-for="(ite, index) in scope.row.order_child"
                  :key="index"
                  :class="[
                    'lis',
                    ite.status == 1
                      ? 'wancheng'
                      : ite.status == 2
                      ? 'unwancheng'
                      : 'unpush',
                    (ite.is_appoint == 2) &
                    (ite.is_epiboly == 1) &
                    (ite.status == 2)
                      ? 'unwanchengs'
                      : '',
                  ]"
                  @dblclick="db_pushorder(ite)"
                >
                  <span
                    style="
                      font-size: 12px;
                      transform: scale(0.8, 0.8);
                      *font-size: 10px;
                    "
                    >{{ ite.job_type ? ite.job_type.job_type : "" }}</span
                  >
                  <span
                    style="
                      font-size: 12px;
                      transform: scale(0.8, 0.8);
                      *font-size: 10px;
                    "
                  >
                    {{
                      ite.status == 1
                        ? "已完成"
                        : ite.status == 2
                        ? "加工中"
                        : (ite.is_appoint == 2) & (ite.is_epiboly == 2)
                        ? "未领取"
                        : "未领取"
                    }}</span
                  >
                </div>
              </div>
            </el-col>
            <el-col :span="4" style="flex: 1; text-align: center">
              <el-dropdown trigger="click">
                <el-button type="primary" size="small">
                  操作<i class="el-icon-arrow-down el-icon--right"></i>
                </el-button>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item>
                    <el-button
                      type="text"
                      v-permission="['dingdanjindu_more']"
                      @click="set_products(scope.row)"
                      >领单详情</el-button
                    >
                  </el-dropdown-item>
                  <el-dropdown-item>
                    <el-popconfirm
                      v-permission="['dingdanjindu_shanchu']"
                      confirm-button-text="确定"
                      cancel-button-text="取消"
                      icon="el-icon-info"
                      icon-color="red"
                      title="确定删除此订单吗？"
                      @confirm="del_Order(scope.row.id)"
                    >
                      <el-button slot="reference" type="text">删除</el-button>
                    </el-popconfirm>
                  </el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
            </el-col>
          </el-row>
        </template>
      </el-table-column>
    </el-table>
    <div class="pagination">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        background
        @prev-click="prev"
        @next-click="next"
        :current-page.sync="pagination.page"
        :page-size="pagination.per_page"
        layout="total, prev, pager, next"
        :total="total"
      >
      </el-pagination>
    </div>

    <el-dialog
      title="生产信息"
      :visible.sync="isset_1"
      width="30%"
      :close-on-click-modal="false"
      @close="close_dialog"
    >
      <el-row v-if="push_order.is_epiboly == 1">
        <el-col>
          <span style="color: crimson; font-size: 16px">*当前订单已外包*</span>
        </el-col>
      </el-row>
      <el-row v-if="push_order.is_appoint == 1">
        <el-col>
          <span style="color: crimson; font-size: 16px">*当前订单已指派*</span>
        </el-col>
      </el-row>
      <!-- <el-row
        style="height: 40px;line-height: 40px;display: flex;align-items: center;">
        <el-col :span="3"> 工序ID </el-col>
        <el-col :span="21">
          {{ push_order.id }}
        </el-col>
      </el-row> -->
      <el-row
        style="
          height: 40px;
          line-height: 40px;
          display: flex;
          align-items: center;
        "
      >
        <el-col :span="3"> 当前工序 </el-col>
        <el-col :span="21" v-if="push_order.job_type">
          {{ push_order.job_type.job_type }}
        </el-col>
      </el-row>
      <el-row
        style="
          height: 40px;
          line-height: 40px;
          display: flex;
          align-items: center;
        "
      >
        <el-col :span="3"> 领单人 </el-col>
        <el-col :span="21">
          <el-select
            v-model="push_order.employee_user_id"
            placeholder="请选择工人"
            style="width: 100%"
          >
            <el-option
              v-for="(item, index) in pushCustomerList"
              :key="index"
              :label="item.employee.employee_name"
              :value="item.id"
            >
            </el-option>
          </el-select>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="isset_1 = false" type="primary" size="small"
          >取消</el-button
        >
        <el-button
          @click="push_set_1"
          v-permission="['dingdanjindu_pushset']"
          type="primary"
          size="small"
          >确定</el-button
        >
      </span>
    </el-dialog>

    <el-dialog
      title="生产订单领取及完成情况表"
      :visible.sync="isProducts"
      width="50%"
      :close-on-click-modal="false"
    >
      <el-table
        :data="moreList"
        stripe
        @selection-change="handleSelectionChang"
        style="width: 100%"
        border
      >
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column prop="serial_number" label="工种" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.job_type.job_type }}</span>
          </template>
        </el-table-column>
        <el-table-column label="领单人" width="120">
          <template slot-scope="scope">
            <span
              v-if="scope.row.is_epiboly == 1 || scope.row.employee"
              :style="{ color: scope.row.is_epiboly == 1 ? 'red' : '' }"
              >{{
                scope.row.is_epiboly == 1
                  ? "外包"
                  : scope.row.employee.employee_name
              }}</span
            >
          </template>
        </el-table-column>
        <el-table-column label="指派日期" width="170">
          <template slot-scope="scope">
            <span v-if="scope.row.is_epiboly == 1 || scope.row.employee">{{
              scope.row.is_epiboly == 1
                ? scope.row.epiboly_time
                : scope.row.appoint_time
            }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="draw_time" label="领单日期" width="170">
        </el-table-column>
        <el-table-column prop="submit_time" label="完成日期" width="170">
        </el-table-column>
        <el-table-column label="操作" width="100" fixed="right">
          <template slot-scope="scope">
            <el-popconfirm
              confirm-button-text="确定"
              cancel-button-text="取消"
              icon="el-icon-info"
              icon-color="red"
              title="确定外包该订单吗？"
              @confirm="set_waibaos(scope.row)"
            >
              <el-button
                slot="reference"
                type="text"
                style="margin-right: 10px"
                v-if="scope.row.draw_time == null && scope.row.is_epiboly == 2"
                >外包</el-button
              >
            </el-popconfirm>
            <el-button
              @click="set_yuangong(scope.row)"
              type="text"
              v-if="scope.row.draw_time == null && scope.row.is_epiboly == 2"
              >指派</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <el-button @click="add_dayinpush" type="primary" size="small"
          >添加到打印列表</el-button
        >
        <el-button @click="isProducts = false" type="primary" size="small"
          >确定</el-button
        >
      </span>
    </el-dialog>

    <el-dialog
      title="指派"
      :visible.sync="isset"
      width="30%"
      :close-on-click-modal="false"
      v-if="moreLists.id && push_more.id"
    >
      <el-row
        style="
          height: 50px;
          line-height: 50px;
          display: flex;
          align-items: center;
        "
      >
        <el-col :span="3"> 订单ID </el-col>
        <el-col :span="21">
          {{ moreLists.id }}
        </el-col>
      </el-row>
      <el-row
        style="
          height: 50px;
          line-height: 50px;
          display: flex;
          align-items: center;
        "
      >
        <el-col :span="3"> 产品名 </el-col>
        <el-col :span="21">
          {{ moreLists.product.product_name }}
        </el-col>
      </el-row>
      <el-row
        style="
          height: 50px;
          line-height: 50px;
          display: flex;
          align-items: center;
        "
      >
        <el-col :span="3"> 订单型号 </el-col>
        <el-col :span="21">
          {{ moreLists.model_number.model_number }}
        </el-col>
      </el-row>
      <el-row
        style="
          height: 50px;
          line-height: 50px;
          display: flex;
          align-items: center;
        "
      >
        <el-col :span="3"> 当前工序 </el-col>
        <el-col :span="21">
          {{ push_more.job_type.job_type }}
        </el-col>
      </el-row>
      <el-row
        style="
          height: 50px;
          line-height: 50px;
          display: flex;
          align-items: center;
        "
      >
        <el-col :span="3"> 员工名称 </el-col>
        <el-col :span="21">
          <el-select
            v-model="push_prder.employee_user_id"
            placeholder="请选择员工"
            style="width: 100%"
          >
            <el-option
              v-for="(item, index) in pushCustomerList"
              :key="index"
              :label="item.employee.employee_name"
              :value="item.id"
            >
            </el-option>
          </el-select>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="isset = false">取消</el-button>
        <el-button @click="push_set">确定</el-button>
      </span>
    </el-dialog>

    <bigimg
      :imgurl="bigurl"
      :product="bigproduct"
      :model_number="bigmodel_number"
      ref="img_big"
    ></bigimg>
  </div>
</template>
<script>
import {
  getOrderChildList,
  getUserListByJobTypeId,
  setOrderChildStatus,
  getOrderChildListByOrderId,
  assignOrderChild,
  epibolyOrderChild,
  getCustomerList,
  getModelNumberList,
  getProductList,
  addOrderPrint,
  downloadcode,
  drawOrderChildByEmployeeCardNumnber,
  delOrder,
} from "@/api/product/index";
import bigimg from "@/components/bigimg";
export default {
  components: {
    bigimg,
  },
  data() {
    return {
      formatterTime(row, column) {
        let data = row[column.property];
        return /\d{4}-\d{1,2}-\d{1,2}/g.exec(data);
      },
      bigurl: "",
      bigproduct: "",
      bigmodel_number: "",
      uploadImgUrl: this.$global.imgQianJui,
      // 搜索
      multipleSelection: [],
      multipleSelections: [],
      ModelNumberLists: [],
      ModelNumberList: [],
      order_data: [],
      ser: {
        serial_number: "",
        model_number_id: "",
        order_number: "",
        customer_id: "",
        product_id: "",
        order_date: "",
        is_replenishment: "",
        is_stock_up: "",
        start_time: "",
        end_time: "",
      },
      CustomerList: [],
      productList: [],

      isset_1: false,
      moreList: [],
      moreLists: {},
      isProducts: false,
      customerList_s: [],

      pagination: {
        per_page: 10,
        page: 1,
      },
      total: 0,
      rules: {},
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now() - 8.64e7;
        },
      },
      isset: false,
      ChildList: [],
      pushCustomerList: [], //指定工种员工列表
      push_order: {},
      // 指派提交数据
      push_prder: {
        child_order_id: "",
        employee_user_id: "",
      },
      push_more: {},
      order_id: "",
      parent_username: "",
    };
  },
  mounted() {
    this.get_childList();
    this.getproduct();
    this.getModel();
    this.getCustomer();
    this.parent_username = this.$store.getters.userInfo.parent_username;
  },
  methods: {
    del_Order(id) {
      delOrder({ id }).then((res) => {
        if (res.code == 200) {
          this.$message.success("操作成功");
          this.isProduct = false;
          this.get_childList();
        }
      });
    },
    push_img(row) {
      this.bigurl = row.model_number.file.file_url;
      this.bigproduct = row.product.product_name;
      this.bigmodel_number = row.model_number.model_number;
      this.$refs.img_big.open();
    },
    add_dayinpush() {
      if (this.multipleSelection.length == 0) {
        this.$message.error("请选择子订单");
        return false;
      }
      let noling = [];
      for (var i = 0; i < this.multipleSelections.length; i++) {
        if (
          this.multipleSelections[i].employee == null &&
          this.multipleSelections[i].is_epiboly == 2 &&
          this.multipleSelections[i].is_appoint == 2
        ) {
          this.$message.error("所选订单有未指派的订单！请指派后在添加~");
          return false;
        }
        if (!this.multipleSelections[i].draw_time) {
          let obj = {
            user_id: this.multipleSelections[i].employee_user_id,
            order_child_id: this.multipleSelections[i].id,
          };
          noling.push(obj);
        }
      }
      var istrue;
      if (noling.length > 0) {
        istrue = noling.forEach((item) => {
          let islingdan = this.postw_drawOrderChildByEmployeeCardNumnber(
            item.user_id,
            item.order_child_id
          );
          if (islingdan) {
            return true;
          }
        });
      } else {
        istrue = true;
      }
      let multipleSelectionarr = [];
      this.multipleSelection.forEach((item) => {
        multipleSelectionarr.push(item.id);
      });

      if (istrue) {
        let obj = {
          order_id: this.order_id,
          order_child_ids: multipleSelectionarr,
        };
        addOrderPrint(obj).then((res) => {
          if (res.code == 200) {
            this.$message.success("添加成功");
          }
        });
      }
    },
    postw_drawOrderChildByEmployeeCardNumnber(user_id, order_child_id) {
      let obj = {
        order_child_id,
        user_id,
        parent_username: this.parent_username,
      };
      drawOrderChildByEmployeeCardNumnber(obj).then((res) => {
        if (res.code == 200) {
          return true;
        } else {
          this.$message.error("领单失败");
        }
      });
    },
    handleSelectionChang(val) {
      if (val.length > 0) {
        this.multipleSelections = val;
        this.order_id = val[0].order_id;
        this.multipleSelection = [];
        val.forEach((item) => {
          let obj = {
            user_id: item.employee_user_id,
            order_child_id: item.id,
          };
          this.multipleSelection.push(obj);
        });
      } else {
        this.multipleSelection = [];
      }
    }, // 指定查询
    // 指定查询
    search(type) {
      if (type == 0) {
        this.pagination.per_page = 10;
        this.pagination.page = 1;
      }
      this.ChildList = [];
      getOrderChildList({ ...this.ser, ...this.pagination }).then((res) => {
        if (res.code == 200) {
          this.ChildList = res.data.data;
          this.total = res.data.total;
          if (type == 2) {
            if (res.data.data.length > 0) {
              this.$message.success("正在导出订单列表");
              this.exports_w();
            }
          }
        }
      });
    },
    // 导出
    exports_w() {
      let data = {
        ...this.ser,
        export: 1,
      };
      getOrderChildList(data).then((res) => {
        //创建一个隐藏的a连接，
        const link = document.createElement("a");
        let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
        link.style.display = "none";
        //设置连接
        link.href = URL.createObjectURL(blob);
        link.download = "订单信息";
        document.body.appendChild(link);
        //模拟点击事件
        link.click();
      });
    },
    searchreset() {
      this.ser = {
        model_number_id: "",
        order_number: "",
        customer_id: "",
        product_id: "",
        order_date: "",
        is_replenishment: "",
        is_stock_up: "",
        start_time: "",
        end_time: "",
      };
      this.get_childList();
    },
    //客户列表
    getCustomer() {
      getCustomerList({per_page:99999}).then((res) => {
        if (res.code == 200) {
          this.CustomerList = res.data.data;
        }
      });
    },
    //产品列表
    getproduct() {
      getProductList().then((res) => {
        if (res.code == 200) {
          this.productList = res.data.data;
        }
      });
    },
    // 型号列表
    getModel() {
      getModelNumberList().then((res) => {
        if (res.code == 200) {
          this.ModelNumberLists = res.data.data;
        }
      });
    },
    order_data_change(val) {
      this.ser.start_time = val[0];
      this.ser.end_time = val[1];
    },
    product_id_change(val) {
      this.ser.model_number_id = "";
      this.ModelNumberList = [];
      this.productList.forEach((item) => {
        if (item.id == val) {
          // 型号列表
          this.ModelNumberList = item.model_number;
        }
      });
    },
    // 获取子订单
    get_childList() {
      getOrderChildList({ ...this.pagination, ...this.ser }).then((res) => {
        if (res.code == 200) {
          this.ChildList = res.data.data;
          this.total = res.data.total;
        }
      });
    },
    //设置订单为已完成
    push_set_1() {
      setOrderChildStatus({
        child_order_id: this.push_order.id,
        employee_user_id: this.push_order.employee_user_id,
      }).then((res) => {
        if (res.code == 200) {
          this.$message({
            type: "success",
            message: "操作成功",
          });
          this.get_childList();
          this.isset_1 = false;
        }
      });
    },
    // 双击打开
    db_pushorder(row) {
      if (row.status != 1) {
        this.getUser(row.job_type.id);
        this.push_order = row;
        if (row.employee) {
          this.push_order.employee_user_id = row.employee.id;
        }
        this.isset_1 = true;
      }
    },
    //获取指定工种员工列表
    getUser(id) {
      getUserListByJobTypeId({ job_type_id: id }).then((res) => {
        if (res.code == 200) {
          this.pushCustomerList = res.data;
        }
      });
    },
    close_dialog() {
      this.push_order = {
        id: "",
        employee_user_id: "",
        job_type: {},
      };
    },

    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.pagination.page = val;
      this.get_childList();
    },
    prev() {
      this.pagination.page = this.pagination.page - 1;
      this.get_childList();
    },
    next() {
      this.pagination.page = this.pagination.page + 1;
      this.get_childList();
    },
    // 获取对应子订单信息
    getOrderChild(id) {
      getOrderChildListByOrderId({ order_id: id }).then((res) => {
        if (res.code == 200) {
          // this.moreLists=res.data
          this.moreList = res.data;
        }
      });
    },
    //指派订单大弹窗
    set_products(row) {
      this.moreLists = row;
      this.getOrderChild(row.id);
      this.isProducts = true;
    },
    // 外包提交
    set_waibaos(row) {
      epibolyOrderChild({ child_order_id: row.id }).then((res) => {
        if (res.code == 200) {
          this.$message.success("外包成功");
          this.getOrderChild(this.moreLists.id);
          this.get_childList();
        }
      });
    },
    //获取指定工种员工列表
    getUser(id) {
      getUserListByJobTypeId({ job_type_id: id }).then((res) => {
        if (res.code == 200) {
          this.pushCustomerList = res.data;
        }
      });
    },
    //打开指派弹窗
    set_yuangong(row) {
      this.push_more = row;
      this.isset = true;
      this.push_prder.child_order_id = row.id;
      this.getUser(row.job_type.id);
    },
    // 指派提交
    push_set() {
      assignOrderChild(this.push_prder).then((res) => {
        this.$message.success("指派成功");
        this.isset = false;
        this.getOrderChild(this.moreLists.id);
        this.push_prder = {
          child_order_id: "",
          employee_user_id: "",
        };
        this.get_childList();
      });
    },
  },
};
</script>
<style>
.my-label {
  background: #e1f3d8;
}

/* .my-content {
    background: #dd7575;
    color: #fff;
  } */

.ul {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 10px;
}

.li {
  width: 32.5%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  -o-box-sizing: border-box;
  overflow: hidden;
  margin-top: 16px;
  margin-left: 1.02%;
}

.li:nth-child(3n-2) {
  margin-left: 0;
}

.uls {
  width: 100%;
  max-width: 100%;
  overflow-x: scroll;
  white-space: nowrap;
}

.uls .lis {
  display: inline-block;
  margin-left: 0px;
  margin-top: 5px;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  -o-box-sizing: border-box;
  border: 1px solid #fff;
  border-radius: 5px;
}

.uls .lis span {
  display: block;
  font-size: 14px;
  width: 100%;
  text-align: center;
  cursor: pointer;
  line-height: 16px;
}

.uls .lis span:nth-child(2) {
  /* margin-top: px; */
}

.wancheng {
  background: #1aa034;
  color: #fff;
}

.unwancheng {
  background: #1b8bf5;
  color: #fff;
}

.unpush {
  background: #ff6561;
  color: #fff;
}
.unwanchengs {
  background: #902c90;
  color: #fff;
}
/* .el-descriptions .is-bordered .el-descriptions-item__cell{
  padding: 5px!important;
} */

.lable_width {
  width: 100px;
}

.el-table .el-table__cell {
  /* padding: 5px 0 !important; */
}

.el-dropdown-menu {
  text-align: center;
}
</style>
